/* Copyright 2014-2018 Rsyn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
#ifndef RSYN_STIPPLE_MASK_H
#define RSYN_STIPPLE_MASK_H

enum LineStippleMask : std::uint8_t {
	LINE_STIPPLE_NONE,
	LINE_STIPPLE_SOLID,
	LINE_STIPPLE_DASHED
};

enum FillStippleMask : std::uint8_t {
	STIPPLE_MASK_EMPTY,
	STIPPLE_MASK_FILL,
	STIPPLE_MASK_YACIF1,
	STIPPLE_MASK_YACIF2,
	STIPPLE_MASK_YACIF3,
	STIPPLE_MASK_YACIF4,
	STIPPLE_MASK_YACIF5,
	STIPPLE_MASK_YACIF6,
	STIPPLE_MASK_CROSS,
	STIPPLE_MASK_HALFTONE,
	STIPPLE_MASK_CHESS,
	STIPPLE_MASK_DOT,
	STIPPLE_MASK_DIAGONAL_DOWN_1,
	STIPPLE_MASK_DIAGONAL_DOWN_2,
	STIPPLE_MASK_DIAGONAL_DOWN_3,
	STIPPLE_MASK_DIAGONAL_DOWN_4,
	STIPPLE_MASK_DIAGONAL_DOWN_5,
	STIPPLE_MASK_DIAGONAL_UP_1,
	STIPPLE_MASK_DIAGONAL_UP_2,
	STIPPLE_MASK_DIAGONAL_UP_3,
	STIPPLE_MASK_DIAGONAL_UP_4,
	STIPPLE_MASK_DIAGONAL_UP_5,

	STIPPLE_MASK_NUM_MASKS
};

const unsigned char STIPPLE_MASKS[ STIPPLE_MASK_NUM_MASKS ][4*32] = {

{	// Empty
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0 },

{	// Fill, no stipple
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255,
255, 	255, 	255, 	255 },

{	// Yacif Texture 1
192, 	192, 	192, 	192,
64, 	192, 	192, 	192,
12, 	12, 	12, 	12,
12, 	12, 	12, 	12,
192, 	192, 	192, 	192,
192, 	192, 	192, 	192,
12, 	12, 	12, 	12,
12, 	12, 	12, 	12,
192, 	192, 	192, 	192,
192, 	192, 	192, 	192,
12, 	12, 	12, 	12,
12, 	12, 	12, 	12,
192, 	192, 	192, 	192,
192, 	192, 	192, 	192,
12, 	12, 	12, 	12,
12, 	12, 	12, 	12,
192, 	192, 	192, 	192,
192, 	192, 	192, 	192,
12, 	12, 	12, 	12,
12, 	12, 	12, 	12,
192, 	192, 	192, 	192,
192, 	192, 	192, 	192,
12, 	12, 	12, 	12,
12, 	12, 	12, 	12,
192, 	192, 	192, 	192,
192, 	192, 	192, 	192,
12, 	12, 	12, 	12,
12, 	12, 	12, 	12,
192, 	192, 	192, 	192,
192, 	192, 	192, 	192,
12, 	12, 	12, 	12,
12, 	12, 	12, 	12 },

{ // Yacif Texture 2
240, 	240, 	240, 	240,
240, 	240, 	240, 	240,
240, 	240, 	240, 	240,
240, 	240, 	240, 	240,
240, 	240, 	240, 	240,
240, 	240, 	240, 	240,
240, 	240, 	240, 	240,
240, 	240, 	240, 	240,
15, 	15, 	15, 	15,
15, 	15, 	15, 	15,
15, 	15, 	15, 	15,
15, 	15, 	15, 	15,
15, 	240, 	0, 	0,
15, 	240, 	0, 	0,
15, 	240, 	0, 	0,
15, 	240, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
15, 	255, 	255, 	15,
15, 	255, 	255, 	15,
15, 	255, 	255, 	15,
15, 	255, 	255, 	15,
15, 	255, 	255, 	15,
15, 	15, 	15, 	15,
15, 	15, 	15, 	15,
15, 	15, 	15, 	15,
15, 	15, 	15, 	0,
15, 	15, 	15, 	0,
15, 	15, 	15, 	0,
15, 	15, 	15, 	0 },

{ // Yacif Texture 3
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
0, 	123, 	0, 	123,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0,
123, 	0, 	123, 	0 },

{	// Yacif Texture 4 (not implemented yet)
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1,
1, 	1, 	1, 	1 },

{	// Yacif Texture 5
0, 	0, 	0, 	0,
128, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240,
255, 	15, 	255, 	240 },

{	// Yacif Texture 6
0, 	0, 	255, 	240,
0, 	0, 	255, 	240,
0, 	0, 	255, 	240,
0, 	0, 	255, 	240,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0,
0, 	0, 	0, 	0 },

{ // Cross
85, 	85, 	85, 	85,
238, 	238, 	238, 	238,
85, 	85, 	85, 	85,
187, 	187, 	187, 	187,
85, 	85, 	85, 	85,
238, 	238, 	238, 	238,
85, 	85, 	85, 	85,
187, 	187, 	187, 	187,
85, 	85, 	85, 	85,
238, 	238, 	238, 	238,
85, 	85, 	85, 	85,
187, 	187, 	187, 	187,
85, 	85, 	85, 	85,
238, 	238, 	238, 	238,
85, 	85, 	85, 	85,
187, 	187, 	187, 	187,
85, 	85, 	85, 	85,
238, 	238, 	238, 	238,
85, 	85, 	85, 	85,
187, 	187, 	187, 	187,
85, 	85, 	85, 	85,
238, 	238, 	238, 	238,
85, 	85, 	85, 	85,
187, 	187, 	187, 	187,
85, 	85, 	85, 	85,
238, 	238, 	238, 	238,
85, 	85, 	85, 	85,
187, 	187, 	187, 	187,
85, 	85, 	85, 	85,
238, 	238, 	238, 	238,
85, 	85, 	85, 	85,
187, 	187, 	187, 	187 },

{ // Halftone
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170 },

{ // Chess
153, 	153, 	153, 	153,
153, 	153, 	153, 	153,
102, 	102, 	102, 	102,
102, 	102, 	102, 	102,
153, 	153, 	153, 	153,
153, 	153, 	153, 	153,
102, 	102, 	102, 	102,
102, 	102, 	102, 	102,
153, 	153, 	153, 	153,
153, 	153, 	153, 	153,
102, 	102, 	102, 	102,
102, 	102, 	102, 	102,
153, 	153, 	153, 	153,
153, 	153, 	153, 	153,
102, 	102, 	102, 	102,
102, 	102, 	102, 	102,
153, 	153, 	153, 	153,
153, 	153, 	153, 	153,
102, 	102, 	102, 	102,
102, 	102, 	102, 	102,
153, 	153, 	153, 	153,
153, 	153, 	153, 	153,
102, 	102, 	102, 	102,
102, 	102, 	102, 	102,
153, 	153, 	153, 	153,
153, 	153, 	153, 	153,
102, 	102, 	102, 	102,
102, 	102, 	102, 	102,
153, 	153, 	153, 	153,
153, 	153, 	153, 	153,
102, 	102, 	102, 	102,
102, 	102, 	102, 	102 },

{ // dot
0, 	0, 	0, 	0,
17, 	17, 	17, 	17,
0, 	0, 	0, 	0,
68, 	68, 	68, 	68,
0, 	0, 	0, 	0,
17, 	17, 	17, 	17,
0, 	0, 	0, 	0,
68, 	68, 	68, 	68,
0, 	0, 	0, 	0,
17, 	17, 	17, 	17,
0, 	0, 	0, 	0,
68, 	68, 	68, 	68,
0, 	0, 	0, 	0,
17, 	17, 	17, 	17,
0, 	0, 	0, 	0,
68, 	68, 	68, 	68,
0, 	0, 	0, 	0,
17, 	17, 	17, 	17,
0, 	0, 	0, 	0,
68, 	68, 	68, 	68,
0, 	0, 	0, 	0,
17, 	17, 	17, 	17,
0, 	0, 	0, 	0,
68, 	68, 	68, 	68,
0, 	0, 	0, 	0,
17, 	17, 	17, 	17,
0, 	0, 	0, 	0,
68, 	68, 	68, 	68,
0, 	0, 	0, 	0,
17, 	17, 	17, 	17,
0, 	0, 	0, 	0,
68, 	68, 	68, 	68 },

{ // Diagonal Down 1
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170 },

{ // Diagonal Down 2
34, 	34, 	34, 	34,
17, 	17, 	17, 	17,
136, 	136, 	136, 	136,
68, 	68, 	68, 	68,
34, 	34, 	34, 	34,
17, 	17, 	17, 	17,
136, 	136, 	136, 	136,
68, 	68, 	68, 	68,
34, 	34, 	34, 	34,
17, 	17, 	17, 	17,
136, 	136, 	136, 	136,
68, 	68, 	68, 	68,
34, 	34, 	34, 	34,
17, 	17, 	17, 	17,
136, 	136, 	136, 	136,
68, 	68, 	68, 	68,
34, 	34, 	34, 	34,
17, 	17, 	17, 	17,
136, 	136, 	136, 	136,
68, 	68, 	68, 	68,
34, 	34, 	34, 	34,
17, 	17, 	17, 	17,
136, 	136, 	136, 	136,
68, 	68, 	68, 	68,
34, 	34, 	34, 	34,
17, 	17, 	17, 	17,
136, 	136, 	136, 	136,
68, 	68, 	68, 	68,
34, 	34, 	34, 	34,
17, 	17, 	17, 	17,
136, 	136, 	136, 	136,
68, 	68, 	68, 	68 },

{ // Diagonal Down 3
8, 	8, 	8, 	8,
4, 	4, 	4, 	4,
2, 	2, 	2, 	2,
1, 	1, 	1, 	1,
128, 	128, 	128, 	128,
64, 	64, 	64, 	64,
32, 	32, 	32, 	32,
16, 	16, 	16, 	16,
8, 	8, 	8, 	8,
4, 	4, 	4, 	4,
2, 	2, 	2, 	2,
1, 	1, 	1, 	1,
128, 	128, 	128, 	128,
64, 	64, 	64, 	64,
32, 	32, 	32, 	32,
16, 	16, 	16, 	16,
8, 	8, 	8, 	8,
4, 	4, 	4, 	4,
2, 	2, 	2, 	2,
1, 	1, 	1, 	1,
128, 	128, 	128, 	128,
64, 	64, 	64, 	64,
32, 	32, 	32, 	32,
16, 	16, 	16, 	16,
8, 	8, 	8, 	8,
4, 	4, 	4, 	4,
2, 	2, 	2, 	2,
1, 	1, 	1, 	1,
128, 	128, 	128, 	128,
64, 	64, 	64, 	64,
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agonal Up 1
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85,
170, 	170, 	170, 	170,
85, 	85, 	85, 	85 },

{ // Diagonal Up 2
68, 	68, 	68, 	68,
136, 	136, 	136, 	136,
17, 	17, 	17, 	17,
34, 	34, 	34, 	34,
68, 	68, 	68, 	68,
136, 	136, 	136, 	136,
17, 	17, 	17, 	17,
34, 	34, 	34, 	34,
68, 	68, 	68, 	68,
136, 	136, 	136, 	136,
17, 	17, 	17, 	17,
34, 	34, 	34, 	34,
68, 	68, 	68, 	68,
136, 	136, 	136, 	136,
17, 	17, 	17, 	17,
34, 	34, 	34, 	34,
68, 	68, 	68, 	68,
136, 	136, 	136, 	136,
17, 	17, 	17, 	17,
34, 	34, 	34, 	34,
68, 	68, 	68, 	68,
136, 	136, 	136, 	136,
17, 	17, 	17, 	17,
34, 	34, 	34, 	34,
68, 	68, 	68, 	68,
136, 	136, 	136, 	136,
17, 	17, 	17, 	17,
34, 	34, 	34, 	34,
68, 	68, 	68, 	68,
136, 	136, 	136, 	136,
17, 	17, 	17, 	17,
34, 	34, 	34, 	34 },

{ // Diagonal Up 3
16, 	16, 	16, 	16,
32, 	32, 	32, 	32,
64, 	64, 	64, 	64,
128, 	128, 	128, 	128,
1, 	1, 	1, 	1,
2, 	2, 	2, 	2,
4, 	4, 	4, 	4,
8, 	8, 	8, 	8,
16, 	16, 	16, 	16,
32, 	32, 	32, 	32,
64, 	64, 	64, 	64,
128, 	128, 	128, 	128,
1, 	1, 	1, 	1,
2, 	2, 	2, 	2,
4, 	4, 	4, 	4,
8, 	8, 	8, 	8,
16, 	16, 	16, 	16,
32, 	32, 	32, 	32,
64, 	64, 	64, 	64,
128, 	128, 	128, 	128,
1, 	1, 	1, 	1,
2, 	2, 	2, 	2,
4, 	4, 	4, 	4,
8, 	8, 	8, 	8,
16, 	16, 	16, 	16,
32, 	32, 	32, 	32,
64, 	64, 	64, 	64,
128, 	128, 	128, 	128,
1, 	1, 	1, 	1,
2, 	2, 	2, 	2,
4, 	4, 	4, 	4,
8, 	8, 	8, 	8 },

{ // Diagonal Up 4
1, 	0, 	1, 	0,
2, 	0, 	2, 	0,
4, 	0, 	4, 	0,
8, 	0, 	8, 	0,
16, 	0, 	16, 	0,
32, 	0, 	32, 	0,
64, 	0, 	64, 	0,
128, 	0, 	128, 	0,
0, 	1, 	0, 	1,
0, 	2, 	0, 	2,
0, 	4, 	0, 	4,
0, 	8, 	0, 	8,
0, 	16, 	0, 	16,
0, 	32, 	0, 	32,
0, 	64, 	0, 	64,
0, 	128, 	0, 	128,
1, 	0, 	1, 	0,
2, 	0, 	2, 	0,
4, 	0, 	4, 	0,
8, 	0, 	8, 	0,
16, 	0, 	16, 	0,
32, 	0, 	32, 	0,
64, 	0, 	64, 	0,
128, 	0, 	128, 	0,
0, 	1, 	0, 	1,
0, 	2, 	0, 	2,
0, 	4, 	0, 	4,
0, 	8, 	0, 	8,
0, 	16, 	0, 	16,
0, 	32, 	0, 	32,
0, 	64, 	0, 	64,
0, 	128, 	0, 	128 },

{ // Diagonal Up 5
0, 	1, 	0, 	0,
0, 	2, 	0, 	0,
0, 	4, 	0, 	0,
0, 	8, 	0, 	0,
0, 	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